package com.bean;

import java.util.List;

public class Teacher {
    private String name;
    private int age;
    private String course[];//数组
    private List<String> city;//集合

    public List<String> getCity() {
        return city;
    }

    public void setCity(List<String> city) {
        this.city = city;
    }

    public String[] getCourse() {
        return course;
    }

    public void setCourse(String[] course) {
        this.course = course;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public void print() {
        System.out.println(name + "老师，年龄：" + age);
        System.out.println("课程：");
        for (String c : course) {
            System.out.println(c + "\t");
        }
        System.out.println("城市："+ city);
    }
}
